%%with/without amur river
clc;clear;
%function [cross_isop_1_lat,w_no_lat,deta_e,depth,zz,Ev,cross_new_1,ahv_lat]=freshwater_test(num_name_file,file_seek,num_month,num_loop)
%clc;clear;
%cd /Volumes/Samsung_T5/program
file_seek=[9 10,11,0,1];
num_loop=1;
%hor_scale=[34:41]; %53N
hor_scale=[39:46];%53.5N
num_month=4;
num_name_file=12;

path(path,'/Users/yuannan/Desktop/sea ice in the okhotsk/in japan/gsw_matlab_v3_06_11');
name_file={'noriver','without-amur','0.25amur','0.5amur','with-amur','2amur','3amur',...
           'withamuronly','with-amur-5-ave','noriver-5-ave','tide_JAN_monthly_mean','without-amur-5-ave','withamuronly-5-ave'};
name_month={'Oct','Nov.','Dec.','Jan.','Feb.'}; 

eval(['cd /Volumes/Samsung_T5/results_',name_file{num_name_file},'/data']);
r1=[130:300];r2=[305:360];
name_var={'s','t','u','v','wzc','ahv','amv'};
name_var1={'s1','t1','u1','v1','w1','ahv1','amv1'};
name_var2={'s3','t3','u3','v3','w3','ahv3','amv3'};

%read data
for i=1:7
    eval(['fid',num2str(i),'=fopen(','''',name_var{i},'.grd','''',',','''','r','''',');']);
    if num_name_file==2 || num_name_file==5 || num_name_file==9 || num_name_file==10
        eval(['fseek(fid',num2str(i),',800*800*84*4*','file_seek(1,num_month)',',-1);']); %for no fresh
    elseif num_name_file==1 || num_name_file==3 || num_name_file==4 || num_name_file==6 || num_name_file==7 || num_name_file==8
       %eval(['fseek(fid',num2str(i),',800*800*84*4*12*5+800*800*84*4*','file_seek(1,num_month)',',-1);']); %for no fresh 查第5年数据
       eval(['fseek(fid',num2str(i),',800*800*84*4*12*9+800*800*84*4*','file_seek(1,num_month)',',-1);']); %for no fresh 查第10年数据
    end
    %eval(['fseek(fid',num2str(i),',800*800*84*4*12*9+800*800*84*4*','file_seek',',-1);']); %for no fresh
    eval([name_var{i},'=fread(fid',num2str(i),',','800*800*84',',','''','real*4','''',');']);
    eval([name_var1{i},'=reshape(',name_var{i},',800,800,84);']);
    eval([name_var1{i},'(',name_var1{i},'<-10000)=nan;']);
    eval(['fclose(fid',num2str(i),');']);
    eval([name_var2{i},'=',name_var1{i},'(r1,r2,:);']);
end

%transfer to 56*171*84
p(1:171,1:56,1:84)=10.1325;
rho=gsw_rho(s3,t3,p)-1000;
r_no=permute(rho,[2,1,3]);
u_no=permute(u3,[2,1,3]);
v_no=permute(v3,[2,1,3]);
w_no=permute(w3,[2,1,3]);
ahv_no=permute(ahv3,[2,1,3]);
%fe_no=permute(fe3,[2,1,3]);
amv_no=permute(amv3,[2,1,3]);

% %page inverse
% for z=1:84
%     r_no_1(:,:,z)=r_no(:,:,85-z);
%     u_no_1(:,:,z)=u_no(:,:,85-z);
%     v_no_1(:,:,z)=v_no(:,:,85-z);
%     w_no_1(:,:,z)=w_no(:,:,85-z);
%     ahv_no_1(:,:,z)=ahv_no(:,:,85-z);
%     amv_no_1(:,:,z)=amv_no(:,:,85-z);
%     %fe_no_1(:,:,z)=fe_no(:,:,85-z);
% end

%for last 5 years average
for z=1:84
    r_no_1(:,:,z)=r_no(:,:,z);
    u_no_1(:,:,z)=u_no(:,:,z);
    v_no_1(:,:,z)=v_no(:,:,z);
    w_no_1(:,:,z)=w_no(:,:,z);
    ahv_no_1(:,:,z)=ahv_no(:,:,z);
    amv_no_1(:,:,z)=amv_no(:,:,z);
    %fe_no_1(:,:,z)=fe_no(:,:,85-z);
end

cd /Volumes/Samsung_T5/program
read_parameter
for z=1:84
   cross(:,:,z)=u_no_1(:,:,z).*gx_new(:,:)+v_no_1(:,:,z).*gy_new(:,:);
   along(:,:,z)=u_no_1(:,:,z).*ax_new(:,:)+v_no_1(:,:,z).*ay_new(:,:);
end

for z=1:84
    div_no(:,:,z)=divergence(u_no_1(:,:,z),v_no_1(:,:,z),XXX(:,:,z),YYY(:,:,z));
end

%section
%averaged vertical integrated cross-isobath current
ver_sum_1(1:56,1:171)=0;
num_ver_1(1:56,1:171)=1;
for ii=1:56
    for jj=1:171
        for kk=2:84
            if isnan(cross(ii,jj,kk))
                continue
            else
                ver_sum_2(ii,jj)=(cross(ii,jj,kk-1)+cross(ii,jj,kk))./2.0.*(depth(1,kk)-depth(1,kk-1));
                ver_sum_1(ii,jj)=ver_sum_1(ii,jj)+ver_sum_2(ii,jj);
                num_ver_1(ii,jj)=num_ver_1(ii,jj)+1;
            end
        end
        ver_ave_1(ii,jj)=ver_sum_1(ii,jj)./depth(1,num_ver_1(ii,jj));
    end
end


% remove the vertical averaged value from mean current
for kk=1:84
    cross_1(:,:,kk)=cross(:,:,kk)-ver_ave_1(:,:);
end


%coastal thermal wind
dens_sum_1(1:56,1:171)=0;
dens_sum_2(1:56,1:171)=0;
num_dens(1:56,1:171)=1;
dens_ave_1(1:56,1:171)=0;

for i=1:56
    for j=1:171
            for kk=2:84
                if isnan(r_no_1(i,j,kk))
                    continue
                else
                    dens_sum_2(i,j)=(r_no_1(i,j,kk)+r_no_1(i,j,kk-1))./2.0.*(depth(1,kk)-depth(1,kk-1));
                    dens_sum_1(i,j)=dens_sum_1(i,j)+dens_sum_2(i,j);
                    num_dens(i,j)=num_dens(i,j)+1;
                end
            end
        dens_ave_1(i,j)=dens_sum_1(i,j)./depth(1,num_dens(i,j));
    end
end

[densgx,densgy]=gradient(dens_ave_1);
densgx=densgx./x_dis;densgy=densgy./y_dis;
length_n=sqrt(densgx.*densgx+densgy.*densgy);
densgx=densgx./length_n;densgy=densgy./length_n; %gradient direction small--->large; right%downward:positive gradient
densay=sqrt(1./((densgy.*densgy)./(densgx.*densgx)+1));%tangent direction
densax=(-1.*densay.*densgy)./densgx;

for z=1:84
   cross_isop(:,:,z)=u_no_1(:,:,z).*densgx(:,:)+v_no_1(:,:,z).*densgy(:,:);
end
%averaged vertical integrated cross-isopycnal current
ver_sum_1_isop(1:56,1:171)=0;
num_ver_1_isop(1:56,1:171)=1;
for ii=1:56
    for jj=1:171
        for kk=2:84
            if isnan(cross_isop(ii,jj,kk))
                continue
            else
                ver_sum_2_isop(ii,jj)=(cross_isop(ii,jj,kk-1)+cross_isop(ii,jj,kk))./2.0.*(depth(1,kk)-depth(1,kk-1));
                ver_sum_1_isop(ii,jj)=ver_sum_1_isop(ii,jj)+ver_sum_2_isop(ii,jj);
                num_ver_1_isop(ii,jj)=num_ver_1_isop(ii,jj)+1;
            end
        end
        ver_ave_1_isop(ii,jj)=ver_sum_1_isop(ii,jj)./depth(1,num_ver_1_isop(ii,jj));
    end
end

for z=1:84
    cross_isop_1(:,:,z)=cross_isop(:,:,z)-ver_ave_1_isop(:,:);
end


for j=1:num_size1
    cross_isop_lat(j,:)=cross_isop(test3(j,1),test4(j,1),:);
    cross_isop_1_lat(j,:)=cross_isop_1(test3(j,1),test4(j,1),:);
    r_no_lat(j,:)=r_no_1(test3(j,1),test4(j,1),:);
    u_no_lat(j,:)=u_no_1(test3(j,1),test4(j,1),:);
    v_no_lat(j,:)=v_no_1(test3(j,1),test4(j,1),:);
    w_no_lat(j,:)=w_no_1(test3(j,1),test4(j,1),:);
    cross_lat(j,:)=cross_1(test3(j,1),test4(j,1),:);
    along_lat(j,:)=along(test3(j,1),test4(j,1),:);
    ahv_lat(j,:)=ahv_no_1(test3(j,1),test4(j,1),:);
    amv_lat(j,:)=amv_no_1(test3(j,1),test4(j,1),:);
    div_lat(j,:)=div_no(test3(j,1),test4(j,1),:);
    %fe_lat(j,:)=fe_no_1(test3(j,1),test4(j,1),:);
    topo_lat(j,1)=topo2(test3(j,1),test4(j,1));  
    ver_ave_lat(j,1)=ver_ave_1_isop(test3(j,1),test4(j,1));
    ver_iso_lat(j,1)=ver_ave_1(test3(j,1),test4(j,1));
    gx_lat(j,1)=gx_new(test3(j,1),test4(j,1));  
    gy_lat(j,1)=gy_new(test3(j,1),test4(j,1));  
    ax_lat(j,1)=ax_new(test3(j,1),test4(j,1));  
    ay_lat(j,1)=ay_new(test3(j,1),test4(j,1)); 
    densgx_lat(j,1)=densgx(test3(j,1),test4(j,1));  
    densgy_lat(j,1)=densgy(test3(j,1),test4(j,1));  
    densax_lat(j,1)=densax(test3(j,1),test4(j,1));  
    densay_lat(j,1)=densay(test3(j,1),test4(j,1));  
end
%scale_1=[34:41];%53N
scale_1=[39:43];%53.5N
%scale_1=[1:num_size1];
gx_lat(scale_1,1)=densgx_lat(scale_1,1);
gy_lat(scale_1,1)=densgy_lat(scale_1,1);
ax_lat(scale_1,1)=densax_lat(scale_1,1);
ay_lat(scale_1,1)=densay_lat(scale_1,1);

for z=1:84
    cross_new(:,z)=u_no_lat(:,z).*gx_lat(:,1)+v_no_lat(:,z).*gy_lat(:,1);
    along_new(:,z)=u_no_lat(:,z).*ax_lat(:,1)+v_no_lat(:,z).*ay_lat(:,1);
    cross_new_1(:,z)=cross_new(:,z)-ver_iso_lat(:,1);
    cross_new_1(scale_1,z)=cross_new(scale_1,z)-ver_ave_lat(scale_1,1);
end

%%
%Richardson number
RI=(amv_lat./ahv_lat-0.8)./7;
%Ekman number
f_col=10e-5;
Ev=2*amv_lat.*0.01.*0.01./((topo_lat.*topo_lat).*f_col);
%Ekman thickness
deta_e=sqrt(amv_lat.*0.01.*0.01./(f_col/2));
%%
%fig_scale=[33:52];%53N
fig_scale=[39:52];
depth_c=19;%13:90m 24:200m 19:154m
[off_intep,depth_intep]=meshgrid(off1_dis(2:15,1),depth(1,1:depth_c));
depth_intep(1,:)=0;
cd /Volumes/Samsung_T5/amur_noamur_figure/
fig_num1=1;
fig_num2=2;
% w_no_lat=fliplr(w_no_lat);
% cross_new=fliplr(cross_new);
% along_new=fliplr(along_new);
% RI=fliplr(RI);
% ahv_lat=fliplr(ahv_lat);
% 
figure(num_loop)
h_sub(1)=subplot(fig_num1,fig_num2,1);
%pcolor(off_intep,depth_intep,w_no_lat(fig_scale,1:depth_c)'.*24.*60.*60./100);shading interp;colormap(h_sub(1),cmocean('-tarn'));

pcolor(off_intep,depth_intep,w_no_lat(fig_scale,1:depth_c)'.*24.*60.*60./100);shading interp;colormap(h_sub(1),cmocean('-tarn'));
%pcolor(off_intep,depth_intep,div_lat(fig_scale,1:depth_c)'./100000./100);shading interp;colormap(h_sub(1),cmocean('-tarn'));
%caxis([-0.5*10e-6 0.5*10e-6]);
%col1=colorbar;
%set(col1,'ticks',[-0.05*10e-5 0 0.05*10e-5],'ticklabels',{'-5','0','5'},'FontName','Arial Rounded MT Bold','fontsize',10);
%title(col1,{'DIV(10^-^6)'},'FontName','Arial Rounded MT Bold','fontsize',10)
hold on;
%[cc1,cch1]=contour(off_intep,depth_intep,cross_new_1(fig_scale,1:depth_c)',[-20 -15 -10 -5 -4 -3 -2 -1 0 1 2 3 4 5 10 15 20],'showtext','on','linewidth',2,'color','k');
col1=colorbar;caxis([-4 4]);
set(col1,'location','southoutside','position',[0.07 0.27 0.15 0.04]);
set(col1,'limits',[-4 4],'ticks',[-4 -2 0 2 4]);
title(col1,'w(m/day)','fontsize',20,'FontName','Arial Rounded MT Bold','color','k');
%hold on;text(18,120,'u_c','fontsize',30,'FontName','Arial Rounded MT Bold','color','k');
hold on
hq1=quiver(off_intep,depth_intep,cross_new(fig_scale,1:depth_c)'*0.5,-1*w_no_lat(fig_scale,1:depth_c)'.*24.*60.*60./100.*6,1.2,'linewidth',3,'color',[255 160 122]/255,'maxheadsize',0.5);
hold on
hq=quiver(off_intep,depth_intep,cross_new(fig_scale,1:depth_c)'*0.5,-1*w_no_lat(fig_scale,1:depth_c)'.*24.*60.*60./100.*6,1.2,'linewidth',1,'color',[0 0 128]/255,'maxheadsize',0.5);
hold on
%[cc1,cch1]=contour(off_intep,depth_intep,along_new(fig_scale,1:depth_c)',[-8 -6 -4 -2 0],'showtext','on','linewidth',2,'color','k');
[cc1,cch1]=contour(off_intep,depth_intep,along_new(fig_scale,1:depth_c)',[-20 -15 -10 -5 0],'showtext','on','linewidth',2,'color','k');
clabel(cc1,cch1,'fontsize',15,'labelspacing',200,'FontName','Arial Black','color','k');
hold on;
quiver(6,60,0,-0.001*24*60*60*6/100,1.2,'k','maxheadsize',5,'linewidth',1.5);
quiver(6,60,3*0.5,0,1.2,'k','maxheadsize',5,'linewidth',1.5);
text(3.9,53.5,'w ','fontsize',10,'FontName','Arial Rounded MT Bold','color','k');
%text(7,50,'0.0015cm/s ','fontsize',7,'FontName','Arial Rounded MT Bold','color','k','rotation',-90);
text(8,60.5,'u','fontsize',10,'FontName','Arial Rounded MT Bold','color','k');
%text(6,63,'3cm/s','fontsize',7,'FontName','Arial Rounded MT Bold','color','k');
text(6,70,'unit vector :','FontName','Arial Rounded MT Bold');
text(6,77,'w  0.001cm/s');
text(6,83,'u  3cm/s');
hold on; text(5,143,'no-Amur','FontName','Arial Rounded MT Bold','color','k','fontsize',20);
%view(0,-90);
set(h_sub(1),'position',[0.05 0.2 0.26 0.35]);
%axis equal

% h_sub(2)=subplot(fig_num1,fig_num2,2);
% pcolor(off_intep,depth_intep,along_new(fig_scale,1:depth_c)');shading interp;colormap(h_sub(2),cmocean('curl'));
% hold on;
% [cc2,cch2]=contour(off_intep,depth_intep,along_new(fig_scale,1:depth_c)',[-25 -20 -15 -10 -5 -1 0],'showtext','on','linewidth',2,'color','k');
% clabel(cc2,cch2,'fontsize',10,'labelspacing',200,'FontName','Arial Black','color','k');
% col2=colorbar;
% %caxis([-10 10]);
% caxis([-30 30]);
% title(col2,'cm/s');set(col2,'ticks',[-30 0 30],'ticklabels',{'-30','0','30'});
% hold on;text(18,120,'u_a','fontsize',30,'FontName','Arial Rounded MT Bold','color','k');
% view(0,-90);
% 
% h_sub(3)=subplot(fig_num1,fig_num2,3);
% pcolor(off_intep,depth_intep,r_no_lat(fig_scale,1:depth_c)');shading interp;colormap(h_sub(3),cmocean('dense'));
% hold on
% [cc3,cch3]=contour(off_intep,depth_intep,r_no_lat(fig_scale,1:depth_c)',[22.2 22.4 22.6 22.8 23 23.2 23.4 23.6 23.8 24 24.2 24.4 24.6 24.8 25 25.2 25.4 25.6],...
%     'linewidth',2,'color','k','showtext','off');
% hold on;
% [cc3,cch3]=contour(off_intep,depth_intep,r_no_lat(fig_scale,1:depth_c)',[25.3 25.4 25.5 25.6 25.7 25.8 25.9 26.0 26.1 26.2],...
%     'linewidth',2,'color','k');
% col3=colorbar;
% caxis([22 26.5]);set(col3,'ticks',[22 24 26.5],'ticklabels',{'22','24','26.5'});
% title(col3,'kg/m^3-1000');%cbfreeze(col3);
% clabel(cc3,cch3,'fontsize',10,'labelspacing',200,'FontName','Arial Black','color','k');
% hold on;text(18,120,'\bf{\rho}','fontsize',30,'FontName','Arial Rounded MT Bold','color','k');
% view(0,-90);

% h_sub(2)=subplot(fig_num1,fig_num2,2);
% pcolor(off_intep,depth_intep,w_no_lat(fig_scale,1:depth_c)'.*24.*60.*60./100);shading interp;colormap(h_sub(2),cmocean('-tarn'));
% hold on
% [cc4,cch4]=contour(off_intep,depth_intep,w_no_lat(fig_scale,1:depth_c)'.*24.*60.*60./100,[-4 -2 0 2 4],...
%     'showtext','on','linewidth',2,'color','k');
% clabel(cc4,cch4,'fontsize',10,'labelspacing',200,'FontName','Arial Black','color','k');
% col4=colorbar;caxis([-4 4]);
% set(col4,'location','southoutside','position',[0.6 0.618 0.2 0.03]);
% title(col4,'w(m/day)','fontsize',25,'FontName','Arial Rounded MT Bold','color','k');
% %hold on;text(18,120,'w','fontsize',30,'FontName','Arial Rounded MT Bold','color','k');
%text(5,145,'5th year(transition)','FontName','Arial Rounded MT Bold','color','k','fontangle','italic','fontsize',20);
view(0,-90);


h_sub(2)=subplot(fig_num1,fig_num2,2);
pcolor(off_intep,depth_intep,RI(fig_scale,1:depth_c)');shading interp;colormap(h_sub(2),cmocean('balance'));
col6=colorbar;%title(col6,'Richardson Number');
hold on
color_1=[56 132 128]/255;

[cc3,cch3]=contour(off_intep,depth_intep,r_no_lat(fig_scale,1:depth_c)',[22.2 22.4 22.6 22.8 23 23.2 23.4 23.6 23.8 24 24.2 24.4 24.6 24.8 25 25.2 25.4 25.6 25.8 26.2],...
    'linewidth',4,'color',color_1,'showtext','off');
hold on;
[cc3,cch3]=contour(off_intep,depth_intep,r_no_lat(fig_scale,1:depth_c)',[25.7 25.9 26.1],...
    'linewidth',4,'color',color_1,'linestyle',':');
clabel(cc3,cch3,'fontsize',15,'labelspacing',200,'FontName','Arial Black','color',color_1);
[cc4,cch4]=contour(off_intep,depth_intep,r_no_lat(fig_scale,1:depth_c)',[26.0 26.0],...
    'linewidth',4,'color',color_1);
clabel(cc4,cch4,'fontsize',15,'labelspacing',200,'FontName','Arial Black','color',color_1);

hold on
[cc5,cch5]=contour(off_intep,depth_intep,ahv_lat(fig_scale,1:depth_c)',[100 300 500 700 900],...
    'showtext','on','linewidth',3,'color',[0 0 128]/255);
clabel(cc5,cch5,'fontsize',15,'labelspacing',200,'FontName','Arial Black','color',[0 0 128]/255);
hold on;
% [cc6,cch6]=contour(off_intep,depth_intep,amv_lat(fig_scale,1:depth_c)',[100 300 500 700 900],...
%     'showtext','on','linewidth',4,'color',[0 128 128]/255);
% [cc6,cch6]=contour(off_intep,depth_intep,RI(fig_scale,1:depth_c)',[0 1 2 3],...
%     'showtext','on','linewidth',4,'color',[0 128 128]/255);
%clabel(cc6,cch6,'fontsize',15,'labelspacing',200,'FontName','Arial Black','color',[0 0 128]/255);
caxis([-5 5]);
set(col6,'limits',[0 3],'ticks',[-0.5 0 3]);
set(col6,'location','southoutside','position',[0.4 0.27 0.14 0.04]);
title(col6,'Ri','fontsize',20,'FontName','Arial Rounded MT Bold','color','k');
set(h_sub(2),'position',[0.38 0.2 0.26 0.35]);
%hold on;text(18,120,'K_v','fontsize',30,'FontName','Arial Rounded MT Bold','color','k');
view(0,-90);


% h_sub(6)=subplot(3,2,6);
% pcolor(flipud(fe_lat').*1000);shading interp;colormap(h_sub(6),cmocean('matter'));
% hold on
% [cc6,cch6]=contour(flipud(fe_lat').*1000,[1 2 3 4 5 6 7 8 9 10 11 12],...
%     'showtext','on','linewidth',2,'color','k');
% clabel(cc6,cch6,'fontsize',10,'labelspacing',200,'FontName','Arial Black','color','k');
% col6=colorbar;title(col6,'\bf{\mu} mole \times 10^-^3');caxis([0 15]);
% hold on;text(35,75,'Fe','fontsize',20,'FontName','Arial Black','color','k');

%replace the iron by richardson number
% h_sub(3)=subplot(fig_num1,fig_num2,3);
% pcolor(off_intep,depth_intep,RI(fig_scale,1:depth_c)');shading interp;colormap(h_sub(3),cmocean('matter'));
% hold on
% [cc6,cch6]=contour(off_intep,depth_intep,RI(fig_scale,1:depth_c)',[0 1 2 3 4 5 6],...
%     'showtext','on','linewidth',2,'color','k');
% clabel(cc6,cch6,'fontsize',10,'labelspacing',200,'FontName','Arial Black','color','k');
% col6=colorbar;%title(col6,'Richardson Number');
% caxis([-0.5 6]);
% set(col6,'limits',[0 5],'ticks',[0 1 2 3 4 5]);
% set(col6,'location','southoutside','position',[0.72 0.3 0.14 0.04]);
% title(col6,'Ri','fontsize',20,'FontName','Arial Rounded MT Bold','color','k');
% %hold on;text(18,120,'Ri','fontsize',30,'FontName','Arial Rounded MT Bold','color','k');
% set(h_sub(3),'position',[0.70 0.25 0.25 0.35])
% view(0,-90);

% h_sub(7)=subplot(fig_num1,fig_num2,7);
% pcolor(off_intep,depth_intep,Ev(fig_scale,1:13)');shading interp;colormap(h_sub(7),cmocean('amp'));
% hold on
% [cc7,cch7]=contour(off_intep,depth_intep,Ev(fig_scale,1:13)',[0.04 0.1],...
%     'showtext','on','linewidth',2,'color','k');
% clabel(cc7,cch7,'fontsize',10,'labelspacing',200,'FontName','Arial Black','color','k');
% col6=colorbar;%title(col6,'Richardson Number');
% caxis([0 0.2]);
% hold on;text(20,70,'Ev','fontsize',20,'FontName','Arial Rounded MT Bold');
% view(0,-90);
% 
% 
% h_sub(7)=subplot(fig_num1,fig_num2,7);
% pcolor(off_intep,depth_intep,deta_e(fig_scale,1:depth_c)');shading interp;colormap(h_sub(7),cmocean('algae'));
% hold on
% [cc8,cch8]=contour(off_intep,depth_intep,deta_e(fig_scale,1:depth_c)',[0 10 20 30 40 50 60 70],...
%     'showtext','on','linewidth',2,'color','k');
% clabel(cc8,cch8,'fontsize',10,'labelspacing',200,'FontName','Arial Black','color','k');
% col6=colorbar;title(col6,'m');
% caxis([0 70]);
% hold on;text(20,70,'{\delta}_E','fontsize',20,'FontName','Arial Rounded MT Bold');
% view(0,-90);

for j=1:2
    set(h_sub(j),...
        'ytick',[0 50 100 150],...
        'yticklabel',{'0','50','100','150'},...
        'FontName','Arial Black','fontsize',15,'linewidth',5,...
        'Tickdir','out');
end
set(gcf,'unit','centimeters','position',[0,0,60,40]);
%eval(['subt=suptitle(','''',name_file{num_name_file},' discharge (',name_month{num_month},' mean)','''',');']);
%set(subt,'FontName','Arial Rounded MT Bold','color','k','fontsize',20);
% xlabel('offshore-distance(km)','position',[-15 130],'fontname','Arial Rounded MT Bold','fontsize',20);
% ylabel('layer-depth(m)','position',[-120 -150],'fontname','Arial Rounded MT Bold','fontsize',20);
cd /Volumes/Samsung_T5/paper_figures
%close(figure(num_loop));
%print(figure(num_loop),'-dpng');
print('s2_no-amur_new','-dtiff','-r600');


%end
